This invention relates to the control of a system, for example, rotary and linear motors with a feedback based upon signals from an optical encoder or magnetic encoder or the like.
Typical motion control systems make use of a feedback transducer in a control loop. Referring to FIG. 1, a generalized motion control loop is shown. A motion control circuit 1 generates a digital command signal 2 and compares it in a summing or subtracting circuit 3 to a digital position feedback signal 4. The comparison may comprise a simple subtraction of the feedback signal from the command signal. The difference or error signal is used to generate an analog current command signal 5 applied to an amplifier 6 driving a motor 7. The motor may be a rotary motor, a rotary motor connected to a ball screw for driving a linear stage, or a linear motor driving a linear stage. Associated with the motor or stage is an encoder 8. In the case of the optical encoder, a disk that rotates with the motor or a plate that is associated either with the positioning table or the track for the positioning table is scribed with a plurality of substantially equally spaced lines. The optical encoder 8 senses the passing lines and generates two-channel analog quadrature signals (SIN and COS). An encoder multiplier 9 processes the digitized SIN and COS signals to resolve them to define a position within a single SIN and COS signal period. The position is represented by a count which is between zero and the maximum count generated for one SIN or COS signal period. A signal is then either generated from the quadrature pair or separately generated to keep track of which scribe lines the stage or motor is between. A microprocessor or digital signal processor at interrupt intervals subtracts the previous count from the instant count and outputs pulses 10 corresponding to the difference. Each pulse is associated with one approximate machine step, that is, the approximate distance the motor or stage moves to cause the encoder multiplier to generate a count. The pulses are passed to the motion control circuit where they are summed, for example, in an up/down counter 11, and the sum is passed to the summing circuit.
In typical systems, the encoder multiplier and motion control circuit are on separate printed circuit cards. The output from the encoder multiplier card is often passed to more than one control card programmed to activate devices outside the motion control system.
The amount of information available from the encoder and associated encoder multiplier is limited by manufacturing methods associated with these devices. The amount of information is defined in units of distance (angular or linear) and is commonly referred to as resolution. In high performance systems, the information obtained directly from the encoder is not sufficient to achieve performance goals. This is the reason for the use of the encoder multiplier which divides the analog SIN and COS signals into discrete values, for example, with the use of an arctangent lookup table. Available encoder multipliers can boost system resolution by factors from 2 to 250 times.
A problem inherent in the mechanical system including the encoder is limited accuracy. System accuracy can be improved by calibration. Calibration methods involve generating error correction data that can be accessed by the motion controller. In prior art motion control systems, the correction takes place in the motion control circuit by corrections made to either the command or error signal.
For certain applications, making the error correction in the motion control circuit to the command signal or the error signal is unacceptable. The most common case is where the signals from the encoder multiplier are used in other parts of a larger system. For example, the position information may be linked to a data acquisition system for purposes of archiving data and/or data overlaying. In these applications, error correction at the motion control circuit level will result in the system position and other controlled events being out of synchronization.
It is an advantage, according to the present invention, to provide an encoder multiplier that introduces correcting counts into the output signal therefrom at high speed, thus providing improved system accuracy.
It is an advantage, according to the present invention, to perform high speed calibration correction on the encoder feedback signals.
It is a further advantage, according to the present invention, that external systems can use the calibrated data.
It is a still further advantage, according to the present invention, that real-time, highly accurate position information eliminates the requirement for much more costly feedback solutions, such as laser interferometer feedback, except at the time of calibration.
It is yet a further advantage, according to the present invention, that a controller card capable of making calibration adjustments is not required and the computation time needed to generate corrected trajectories is eliminated.
Briefly, according to the present invention, there is provided a device, for example, an encoder multiplier for receiving analog signals, commonly referred to as SIN and COS, from an encoder and outputting digital pulses corresponding approximately to the number of equal steps the system of which the encoder is a part has advanced or retreated comprising:
an analog-to-digital converter for digitizing the SIN and COS input signals,
an arctangent lookup table for calculating a relative value, for example, position count within one SIN or COS period from the digitized SIN and COS signals,
a cycle detector for recognizing advance or retreat to an adjacent SIN or COS period,
an up/down counter for holding the total position counts accumulated since the system has moved from a datum position,
flash memory storing a table relating total position counts to the precise position as determined by calibration using a recognized calibration standard gauge,
a digital processor having a defined interrupt interval, the digital signal processor programmed, in response to each new interrupt interval, to:
i) digitize the analog SIN and COS signals,
ii) input the digitized SIN and COS signals and, with reference to the arctangent table, calculate the position count,
iii) substract the current position count from the last position count within one SIN or COS period and storing in a difference register, and
iv) with reference to the flash memory table, add or subtract counts to or from the difference register so that the count in the difference register corresponds to the calibrated distance traversed by the system,
a pulse generator for outputting the number of pulses in the difference register within an interrupt interval, and
connections or buses to convey the calibrated signal.